package giftmail.dao;

import java.util.List;

import com.google.common.collect.Lists;

import giftmail.model.UserExcel;

/**
 * Excel的测试类
 * @author Demo
 *
 */
public class ExcelDb {

static final List<UserExcel> users = Lists.newArrayList();
	
	static {
		// 生成10条测试数据
		for (int i = 0; i < 10; i++) {
			UserExcel e = new UserExcel();
			e.setUid(i+1);
			e.setUsername("USERNAME_"+(i+1));
			e.setPassword("PASSWORD_"+(i+1));
			e.setNickname("NICKNAME_"+(i+1));
			e.setAge(18);
			users.add(e);
		}
	}

	
	public static List<UserExcel> getUsers() {
		return users;
	}
	
	public static void addUser(UserExcel user) {
		users.add(user);
	}
}
